package com.cn.algorithm02.class18;

import com.cn.algorithm02.class17.Edge;
import com.cn.algorithm02.class17.Node;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/***
 * @author: hels
 * @description:
 **/
public class C01_Dijkstra {
    public static void main(String[] args) {
        Node aNode = new Node(1);
        Node bNode = new Node(2);
        Node cNode = new Node(3);
        Node dNode = new Node(4);
        Node eNode = new Node(5);

        Edge ab = new Edge(5, aNode, bNode);
        Edge ac = new Edge(3, aNode, cNode);
        Edge bd = new Edge(1, bNode, dNode);
        Edge be = new Edge(3, bNode, eNode);
        Edge ce = new Edge(7, cNode, eNode);
        Edge de = new Edge(4, dNode, eNode);

        ArrayList<Edge> aEdges = new ArrayList<Edge>();
        aEdges.add(ab);
        aEdges.add(ac);
        aNode.setEdges(aEdges);

        System.out.println(aNode);
        System.out.println(bNode);
        System.out.println(cNode);
        System.out.println(dNode);
        System.out.println(eNode);





    }
}
